package com.chinasofti.manager.config;

import com.chinasofti.common.IdWorker;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Creator: 荣浩 <br>
 * Date: 2020-02-20 <br>
 * Description: 邮件推送配置 <br>
 */
@Configuration
public class IdworkConfig {
    @Value("${Idworker.workerId}")
    private Long workerId;
    @Value("${Idworker.datacenterId}")
    private Long datacenterId;

    @Bean
    public IdWorker idWorker() {
        return new IdWorker(workerId, datacenterId);
    }

}
